<template>
	<view class="wp">
		<rich-text :nodes="item.content" class="rich_text"></rich-text>
		<view class="imgs">
			<image v-for="items in item.thumb" :src="items" mode="widthFix" role="img"></image>
		</view>
		<view class="imgs" v-if="item.video">
			<video :src="item.video"></video>
		</view>
		<share v-show="isShare" @cancelShow="false" :shareText="item.content" :shareImg="item.thumb" :shareVideo="item.video" :shareId="item.id"></share>
	</view>
</template>

<script>
	import share from '@/components/share/share'
	export default {
		components:{
			share
		},
		data() {
			return {
				item: [],
				isShare: true,
				shareImg: [],
			};
		},
		onLoad: function(option){
			this.item = JSON.parse(decodeURIComponent(option.item));
		},
	}
</script>

<style lang="scss" scoped>
	.wp{
		padding: 40rpx 20rpx 210rpx;
		.rich_text{
			word-wrap: break-all;
			white-space: pre-line;
		}
		.imgs{
			margin-top: 20rpx;
			image{
				width: 100%;
				margin-bottom: 10rpx;
			}
			video{
				width: 100%;
			}
		}
	}
</style>
